package com.huatai.user.service;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huatai.user.entity.Department;
import com.huatai.user.vo.DepartmentVo;

import java.util.List;

/**
 * 部门接口
 */
public interface DepartmentService extends IService<Department> {
	/**
	 * 部门保存更新
	 * @param department
	 * @return
	 */
	boolean saveDepartment(Department department);

	/**
	 * 删除部门如果有子部门要先删除子部门
	 * @param deptId
	 * @return
	 */
	boolean delDept(Long deptId);

	/**
	 * 递归获取部门
	 * @return
	 */
	List<DepartmentVo> getDeptList(Integer status);

    List<JSONObject> getDepartList();
}
